  $(function () {
        var linkurl ="http://"+window.location.host+"/";//获取当前域名
        $.ajax({
            type : "get",
            url : linkurl + "isLoged",
            data: {},
            dataType: 'json',
            success:function (Result) {
                var result = Result.result;
                if(result==1){
                    $(".pcc_gerenbnt").removeClass("hide");
                    $("#to-login").addClass("hide");
                    $("#to-reg").addClass("hide");
                }
            }
        });
        $("#pcc-logout").click(function () {
            $.ajax({
                type : "post",
                url : linkurl + "logout",
                data: {},
                dataType: 'json',
                success:function () {
                    $(".pcc_gerenbnt").addClass("hide");
                    $("#to-login").removeClass("hide");
                    $("#to-reg").removeClass("hide");
                }
            })
        });
        $.ajax({
            type: 'get',
            url : linkurl + "getXunrenClassifyList",
            data: {},
            dataType: 'json',
            success: function (Result) {
                var  data = Result.data;
                $("#pcc-classify").html("");
                $.each(data, function (index,item) {
                    $("#pcc-classify").append("<a class='pcc_width15' href='d-"+item.id+"/'>"+item.className+"</a>")
                })
            }
        }); 
        $.ajax({
            type : "get",
            url : linkurl + "getindexDiquListByType",
            data: {types : 1,pid : 0},
            dataType: 'json',
            success : function (Result) {
                var data = Result.data;
                $("#pcc-area-province").html("");
                $.each(data, function (index,item) {
                    $("#pcc-area-province").append("<a class='pcc_width15' href='a-"+item.url+"/'>"+item.diquName+"寻人</a>")
                })
            }
        });
    	//右侧导航点击回到头部
        $("#sidebar-c").click(function(){
                     $('body,html').animate({scrollTop:0},1000);
                     return false;
                 });
        $(".search_button3").click(function () {
     	    var search = $("#search_key").val();
      
     	    if(search!=""){
     	        window.location.href = "sousuojieguo.html?search=" + search;
     	    }
     	});
    })
